Method and apparatus for evaluating a confidence level of a decoded barcode

ABSTRACT

A method and apparatus for evaluating a confidence level of a decoded barcode value is disclosed. A digit score is assigned to a digit within a barcode. When decoding the barcode, if a deduction is required to decode the digit, then the digit score for the digit is reduced accordingly. After all the digits within the barcode have been decoded, a total score of a decoded barcode value can be determined by adding all the digit scores for all the digits within the barcode. The total score of the decoded barcode value is reduced if a checksum is used to ascertain the value of any digit within the barcode. The decoded barcode value can be accepted only if the total score exceeds a predetermined value.

BACKGROUND OF THE INVENTION

1. Technical Field

The present invention relates to mail handling in general, and inparticular to a method and apparatus for evaluating barcode on mails.Still more particularly, the present invention relates to a method andapparatus for evaluating a confidence level of a decoded barcode from amail piece.

2. Description of the Related Art

In recent years, the United States Postal Service (USPS) has adopted anew form of zip codes that contains more detailed destinationinformation than the original five-digit zip codes. The so-called ZIP+4zip code contains an additional four-digit extension that generallyidentifies an address within a side of residential block. A furtherenhancement to the zip code system is the utilization of a 11-digit zipcode to specify a point of delivery.

In conjunction with the new zip code system, the USPS also developed thePostal Numeric Encoding Technique (POSTNET) to provide an optimizedbarcode system for encoding zip code information on mail pieces. As aninducement to mailers to prepare their mails in such a way so as tobring about faster mail delivery, the USPS offers postage discounts tomailers for mail items such as presorted mail. Postage discounts arealso given to mailers when mails are pre-printed with a 11-digit zipcode in an approved barcode format.

Even if a mail piece does not have a pre-printed barcode, the USPS canprovide the mail piece with a POSTNET barcode. This is because barcodingenable mail sorting machines to sort and route mails in a more rapidfashion. Generally speaking, the digits in a POSTNET barcode are encodedusing a fixed number of tall bars and a fixed number of short bars. Inorder to guard against errors, two levels of redundancy are incorporatedwithin each POSTNET barcode. The first level of redundancy is in the waydigits are encoded. Each digit is encoded in a way that the location ofa tall bar can be deduced from the locations of all short bars, and viceversa. The second level of redundancy is the inclusion of a correctiondigit to the entire 11-digit zip code. The inclusion of a correctiondigit ensures that the sum of all the digits (i.e., checksum) within aPOSTNET barcode is a multiple of 10. Thus, if a digit within a POSTNETbarcode cannot be decoded, the checksum can be used to determine such.

Even with the two levels of built-in redundancy as mentioned above,errors will still occur when decoding a POSTNET barcode. Thus, it wouldbe desirable to provide a method and apparatus for evaluating aconfidence level of a decoded POSTNET barcode.

SUMMARY OF THE INVENTION

In accordance with a preferred embodiment of the present invention, adigit score is assigned to a digit within a barcode. When decoding thebarcode, if a deduction is required to decode the digit, then the digitscore for the digit is reduced accordingly. After all the digits withinthe barcode have been decoded, a total score of a decoded barcode valuecan be determined by adding all the digit scores for all the digitswithin the barcode. The total score of the decoded barcode value isreduced if a checksum is used to ascertain the value of any digit withinthe barcode. The decoded barcode value can be accepted only if the totalscore exceeds a predetermined value.

All objects, features, and advantages of the present invention willbecome apparent in the following detailed written description.

DESCRIPTION OF THE DRAWINGS

The invention itself, as well as a preferred mode of use, furtherobjects, and advantages thereof, will best be understood by reference tothe following detailed description of an illustrative embodiment whenread in conjunction with the accompanying drawings, wherein:

FIG. 1 is a mail piece barcode evaluation station in accordance with apreferred embodiment of the present invention;

FIG. 2 is a diagram of a POSTNET barcode to which a preferred embodimentof the present invention is applicable; and

FIG. 3 is a high-level logic flow diagram of a method for determining aconfidence level of a decoded barcode from a mail piece, in accordancewith the preferred embodiment of the present invention.

DESCRIPTION OF A PREFERRED EMBODIMENT

Referring now to the drawings and in particular to FIG. 1, there isdepicted a mail piece barcode evaluation station in accordance with apreferred embodiment of the present invention. As used herein, “mail” or“mail piece” is defined as an item entrusted with the United StatesPostal Service (USPS) or a private delivery organization for transportto a destination designated by a mailer. As shown, a mail piece barcodeevaluation station 10 includes a mail handler 20 coupled to a processingunit 11. Preferably, processing unit 11 is a ruggedized industrial-gradepersonal computer having customized hardware and software to interfacewith various components of mail piece barcode evaluation station 10.Processing unit 11 controls selected operations performed by mailhandler 20 through a mail handler interface 12. Processing unit 11 isalso coupled to a number of input/output (I/O) devices via an I/Ointerface 13. Such I/O devices may include a display 16, a printer 17 akeyboard 18, and a mouse 19.

Furthermore, processing unit 11 includes a look-up table (LUT) 14configured to determine at least a portion of an address correspondingto a proper mail piece barcode, such as a Postal Numeric EncodingTechnique (POSTNET) barcode. LUT 14 is preferably entered with dataobtained from scanning a mail piece barcode to produce at least aportion of a corresponding multi-character address. The decoded addressmay be further processed to verify accuracy of the mail piece barcode.LUT 14 may reside in a storage medium coupled to processing unit 11.Preferably, the storage medium is a readable/writable memory device thatmay be readily updated as the mail piece barcode standard changes.

Mail handler 20 includes a bed 21 that defines a feed bin 22, atransport system 25, and a stacker 31. Feed bin 22 holds mail pieces ina mail row 24 for evaluation. Transport system 25 selectively moves mailpieces one at a time from feed bin 22. Transport system 25 includes afeeder 26, a transport path 28 and a transport controller 30. Feeder 26selectively feeds mail pieces from mail row 24 to transport path 28.Transport of a mail piece, such as a mail piece 29 shown in transportpath 28, is controlled by transport controller 30. In FIG. 1, thedirection of travel provided by transport system 25 is generally fromleft to right, although in other embodiments, the direction of travelpath of mail pieces may differ. Transport system 25 also includes pinchrollers or belt conveyors (not shown) to transport mail pieces.

An imaging device 32 is configured to selectively provide a signalcorresponding to an image of an item viewed adjacent platten 36.Preferably, imaging device 32 is a line scan camera that generates anelectric signal corresponding to a scanned image. Alternatively, imagingdevice 32 may be an area camera, an array of optical sensors, or otherimaging device. After passing through imaging device 32, a mail piece isthen transported to print head 38. Print head 38 selectively marks themail piece in transport path 28. Preferably, print head 38 is of the inkjet variety. Alternatively, another type of marking device may be used.Mail piece exits transport path 28 into a collection bin 32. Collectionbin 32 holds a mail row 33 after processing along transport path 28.Stacker 31 assembles and maintains evaluated mail row 33. Instead ofcollection bin 32, other embodiments may transport mail pieces to a trayor other device after processing in mail handler 20.

Processing unit 11 coordinates and controls various operations of mailpiece barcode evaluation station 10 via mail handler interface 12. Mailhandler interface 12 includes operative links to feeder 26, transportcontroller 30, imaging device 32, and print head 38. Processing unit 11includes barcode requirements data that provides information pertinentto the acceptability of a barcode.

With reference now to FIG. 2, there is depicted a diagram of a POSTNETbarcode to which a preferred embodiment of the present invention isapplicable. As shown, a POSTNET barcode 40 includes a beginning framebar 41 and an ending frame bar 42. Each digit within POSTNET barcode 40is encoded using two tall bars and three short bars. Two levels ofdecoding redundancy are included within POSTNET barcode 40. First, foreach digit, the location of a tall bar can be deduced from the locationsof the three short bars, and the location of a short bar can be deducedfrom the locations of the two tall bars. Second, a correction digit 43is provided, in addition to a 11-digit zip code 44, to ensure that thesum of all the barcode digits (i.e., a checksum) is a multiple of 10. Assuch, if one digit within POSTNET barcode 40 is unreadable duringdecoding, the checksum can be used to determine the value of the digit.

If one or both of the above-mentioned two levels of redundancy must beused in order to decode POSTNET barcode 40, less confidence should beplaced in a decoded value of POSTNET barcode 40. The following criteriacan be used as a measure of that confidence:

a. each digit within a barcode contributes a proportional or equal valuetowards a total score of 100;

b. the number of ambiguous, absent, or out-of-bounds bars is countedagainst each digit;

c. a digit with one “bad” bar reduces the allotted value of its score,preferably by 50%;

d. a digit with more than one “bad” bar does not contribute any value toits score; and

e. if the checksum is used to determine the number of a digit that couldnot be decoded, the total score is reduced, preferably by 10%.

The total score is the sum of the scores of all the digits within abarcode. If the total score is higher than a predetermined cutoff value,then the decoded barcode value should be kept; otherwise, the decodedbarcode value should be discarded because of its low confidence level.In the current example, only the total score is used to decide whether adecoded barcode value should be kept or discarded. However, when morethan one decoding algorithm is being used to perform barcode decoding,the total score can be used to decide whether or not a decoded barcodevalue determined by one decoding algorithm needs to be verified orchecked by another decoding algorithm.

The predetermined cutoff value to be used as the cutoff point of thetotal score varies from one mail piece barcode evaluation system toanother, and can be determined experimentally. This is necessary becausethe predetermined cutoff value heavily depends on a specific decodingalgorithm as well as the type of mail piece (i.e., letters, flats, etc.)and the quality of the printed barcode.

Referring now to FIG. 3, there is illustrated a high-level logic flowdiagram of a method for determining a confidence level of a decodedbarcode, in accordance with the preferred embodiment of the presentinvention. Starting at block 50, a digit score is calculated, as shownin block 51, via dividing 100 by the total number of digits within aPOSTNET barcode. For example, if there are 12 digits (i.e., a 11-digitzip code plus a correction digit) within a POSTNET barcode, then eachdigit score=100/12. A digit within a POSTNET barcode is read, asdepicted in block 52. A determination is then made as to whether or nota deduction (i.e., using all tall bars within the digit to deduce thelocation of a short bar, or vice versa) is required to ascertain thelocation of a bar within the digit, as shown in block 53. If a deductionis required, the digit score for the digit is reduced by 50%, asdepicted in block 54. Then, another determination is made as to whethera second deduction is required to ascertain the location of another barwithin the same digit, as shown in block 55. If a second deduction isrequired, the digit score for the digit is set to zero, as depicted inblock 56.

The above-mentioned steps are repeated until all the digits within thePOSTNET barcode have been evaluated, as shown in block 57. Next, a totalscore is calculated by adding all the digit scores of the digits withinPOSTNET barcode, as depicted in block 58. A determination is then madeas to whether or not a checksum was required to ascertain the value ofany digit within the POSTNET barcode, as shown in block 59. If thechecksum is required, the total score is reduced by 10%, as depicted inblock 60. Otherwise, a determination is made as to whether or not thetotal score exceed a predetermined cutoff value, as shown in block 61.If the total score does not exceed a predetermined cutoff value, thedecoded barcode value is discarded because of its unreliability, asdepicted in block 62. In addition to discarding the decoding result, themail piece having the POSTNET barcode can be sent to a different mailpiece barcode evaluation system to further decode the POSTNET barcode.For example, an alternate decoding algorithm can be used to verify thedecoded barcode value. Otherwise, if the total score exceeds thepredetermined cutoff value, the decoded barcode value can be acceptedand the process is completed, as shown in block 63.

As has been described, the present invention provides a method andapparatus for determining a confidence level of a decoded barcode.Although POSTNET barcode is used to illustrate the present invention, itis understood by those skilled in the art that the present invention isalso applicable to other types of zip code encoding techniques, such asPostal Alpha Numeric Encoding Technique (PLANET).

While the invention has been particularly shown and described withreference to a preferred embodiment, it will be understood by thoseskilled in the art that various changes in form and detail may be madetherein without departing from the spirit and scope of the invention.

What is claimed is:
 1. A method for determining a confidence level of adecoded barcode, said method comprising: assigning a digit score to adigit within a barcode; reducing said digit score if a deduction isrequired to decode said digit; determining a total score of a decodedbarcode value by adding digit scores for all digits within said barcode;reducing said total score if a checksum is used to ascertain the valueof any digit within said decoded barcode value; and accepting saiddecoded barcode value if said total score exceeds a predetermined value.2. The method of claim 1, wherein said reducing said digit score furtherincludes reducing said digit score by 50% if a deduction is required todecode said digit.
 3. The method of claim 2, wherein said method furtherincludes setting said digit score to zero if a second deduction isrequired for decoding said digit.
 4. The method of claim 1, wherein saidreducing said total score further includes reducing said total score by10% if a checksum is used to ascertain the value of any digit withinsaid decoded barcode value.
 5. The method of claim 1, wherein saidassigning a digit score further includes assigning an identical digitscore to each digit within said barcode.
 6. A computer program productresiding on a computer usable medium for determining a confidence levelof a decoded barcode value, said computer program product comprising:program code means for assigning a digit score to a digit within abarcode; program code means for reducing said digit score if a deductionis required to decode said digit; program code means for determining atotal score of a decoded barcode value by adding digit scores for alldigits within said barcode; program code means for reducing said totalscore if a checksum is used to ascertain the value of any digit withinsaid decoded barcode value; and program code means for accepting saiddecode barcode value if said total score exceeds a predetermined value.7. The computer program product of claim 6, wherein said program codemeans for reducing said digit score further includes program code meansfor reducing said digit score by 50% if a deduction is required todecode said digit.
 8. The computer program product of claim 7, whereinsaid computer program product further includes program code means forsetting said digit score to zero if a second deduction is required fordecoding said digit.
 9. The computer program product of claim 6, whereinsaid program code means for reducing said total score further includesprogram code means for reducing said total score by 10% if a checksum isused to ascertain the value of any digit within said decoded barcodevalue.
 10. The computer program product of claim 6, wherein said programcode means for assigning a digit score further includes program codemeans for assigning an identical digit score to each digit within saidbarcode.
 11. A mail piece barcode evaluation system capable ofdetermining a confidence level of a decoded barcode, said mail systemcomprising: means for assigning a digit score to a digit within abarcode; means for reducing said digit score if a deduction is requiredto decode said digit; means for determining a total score of a decodedbarcode by adding digit scores for all digits within said barcode; meansfor reducing said total score if a checksum is used to ascertain thevalue of any digit within said decoded barcode value; and means foraccepting said decoded barcode value if said total score exceeds apredetermined value.
 12. The system of claim 11, wherein said means forreducing said digit score further includes means for reducing said digitscore by 50% if a deduction is required to decode said digit.
 13. Thesystem of claim 12, wherein said system further includes means forsetting said digit score to zero if a second deduction is required fordecoding said digit.
 14. The system of claim 11, wherein said means forreducing said total score further includes means for reducing said totalscore by 10% if a checksum is used to ascertain the value of any digitwithin said decoded barcode value.
 15. The system of claim 11, whereinsaid means for assigning a digit score further includes means forassigning an identical digit score to each digit within said barcode.